package com.purchase.ml.entity.order;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author kyyang
 * Created 2021-03-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_dealer_collect")
@ApiModel(value = "SysDealerCollect对象", description = "")
public class SysDealerCollect implements Serializable {


    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("create_at")
    private Date createAt;

    /**
     * 汇总来自的日期
     */
    @ApiModelProperty(value = "汇总来自的日期")
    @TableField("data_date")
    private Date dataDate;

    /**
     * 订单总数
     */
    @ApiModelProperty(value = "订单累计总数")
    @TableField("purchase_ord_num_agg")
    private Long purchaseOrdNumAgg = 0L;

    /**
     * 订单当天总数
     */
    @ApiModelProperty(value = "订单当天总数")
    @TableField("purchase_ord_num_cur")
    private Long purchaseOrdNumCur = 0L;

    /**
     * 订单完成累计总数
     */
    @ApiModelProperty(value = "订单完成累计总数")
    @TableField("purchase_ord_num_final_agg")
    private Long purchaseOrdNumFinalAgg = 0L;

    /**
     * 订单完成当天总数
     */
    @ApiModelProperty(value = "订单完成当天总数")
    @TableField("purchase_ord_num_final_cur")
    private Long purchaseOrdNumFinalCur = 0L;

    /**
     * 累计总销售额
     */
    @ApiModelProperty(value = "累计总销售额")
    @TableField("total_sales_agg")
    private BigDecimal totalSalesAgg = BigDecimal.ZERO;

    /**
     * 当天总销售额
     */
    @ApiModelProperty(value = "当天总销售额")
    @TableField("total_sales_cur")
    private BigDecimal totalSalesCur = BigDecimal.ZERO;

    /**
     * 总利润：type为汇总一级利润；1汇总二级利润
     */
    @ApiModelProperty(value = "累计总利润")
    @TableField("total_profit_agg")
    private BigDecimal totalProfitAgg = BigDecimal.ZERO;
    /**
     * 总利润：type为汇总一级利润；1汇总二级利润
     */
    @ApiModelProperty(value = "当天总利润")
    @TableField("total_profit_cur")
    private BigDecimal totalProfitCur = BigDecimal.ZERO;

    /**
     * 经销商ID
     */
    @ApiModelProperty(value = "经销商ID")
    @TableField("dealer_id")
    private Long dealerId;

    /**
     * 上级ID
     */
    @ApiModelProperty(value = "上级ID")
    @TableField("parent_id")
    private Long parentId;

    /**
     * 类型：0：主经销商汇总；1经销商汇总
     */
    @ApiModelProperty(value = "类型：0：主经销商汇总；1经销商汇总")
    @TableField("dealer_type")
    private Integer dealerType;

    /**
     * 第几天
     */
    @ApiModelProperty(value = "第几天")
    @TableField("day")
    private Integer day;

    /**
     * 月
     */
    @ApiModelProperty(value = "月")
    @TableField("month")
    private Integer month;

    /**
     * 年
     */
    @ApiModelProperty(value = "年")
    @TableField("year")
    private Integer year;

    @TableField(exist = false)
    private int region;

    @TableField(exist = false)
    private int dealerName;


}
